﻿using System;
using System.Collections.Generic;
using System.Timers;

namespace Yxinmt.Entity
{
    public class Meeting
    {
        public Guid MeetingId { get; set; }
        public string Title { get; set; }

        public string UserName { get; set; }

        public List<MeetingSubject> Subjects { get; set; }  
    }

    public class MeetingSubject
    {
        public Guid SubjectId { get; set; }
        public string Name { get; set; }

        public List<FileInfo> Files { get; set; }
    }

    public class FileInfo
    {
        public string Name
        {
            get
            {
                if (VideoType == 2) return string.Empty;
                return FileName.Replace(System.IO.Path.GetExtension(FileName), string.Empty);
            }
            set
            {
                
            }
        }

        public Guid MeetingId { get; set; }

        public Guid FileId { get; set; }
        public string FileName { get; set; }
        
        public string DirFileName { get; set; }
        public int FileSize { get; set; }

        public string FileType { get; set; }

        public string FileMd5 { get; set; }

        public string FilePath { get; set; }

        /// <summary>
        /// 编辑类型，0：只读，1：批注，2：电子白板，3：笔记
        /// </summary>
        public int RecordType { get; set; }

        public string RecordTypeName
        {
            get
            {
                return RecordType == 1 ? "annotations" : RecordType == 2 ? "whiteboards" : "records";
            }
            set
            {

            }
        }

        public Guid NoteFileId { get; set; }

        public byte[] NoteFileImage { get; set; }

        public string Content { get; set; }

        public bool IsNew { get; set; }

        public string ContentUrl { get; set; }

        public byte[] InkCanvasBytes { get; set; }

        public int VideoType { get; set; }

        public string FileUrl { get; set; }

        public string Message { get; set; }

        public string DownloadProgress { get; set; }

        public double Index { get; set; }

        public int Percentage { get; set; }

        public FileInfo()
        {
            Content = string.Empty;
        }
    }

    public class MeetingSubjectFileSlice
    {
        public Guid SliceId { get; set; }
        public Guid FileId { get; set; }
        public string FileUrl { get; set; }
        public int FileSize { get; set; }
        public int DisplayIndex { get; set; }
        public string StartDate { get; set; }
        public string EndDate { get; set; }

        public Guid MeetingId { get; set; }

        public long ElapsedMilliseconds { get; set; }
    }
}
